package util;
/*
 * ImageInfo.java
 *
 * Created on 16 de julio de 2007, 12:38
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

/**
 *
 * @author mauri
 */
import java.io.File;
import java.net.URL;

public class ImageInfo extends Object{
    public URL urlname;
    public String title = "";
    public String description = "";
    public String owner = "";
    public String guid = "";
    public String fullpathname = "";

    public ImageInfo(String ImageUrl, String Directory, String ImageTitle, String ImageDescription, String ImageGuid, String ImageOwner){
        try {
            urlname = new URL(ImageUrl);
            title = ImageTitle;
            description = ImageDescription;
            guid = ImageGuid;
            owner = ImageOwner;

            //build the full path name to the image so we can load it
            fullpathname = Directory + File.separator + guid + ".jpg";
        } catch (Exception e){
            e.printStackTrace();
        }
    }

    public ImageInfo(String ImageFilename, String Directory){
        try {
            guid = ImageFilename.replaceAll(".jpg","");
            fullpathname = Directory + File.separator + guid + ".jpg";
            System.out.println("ImageInfo: Setting guid to "+ guid);

            title = "";
            description = "";
            owner = "";
        } catch (Exception e){
            e.printStackTrace();
        }
    }
}
